package com.ibiaoke.system.dao;

import com.ibiaoke.common.base.BaseDao;
import com.ibiaoke.system.entity.AppVersions;
import com.ibiaoke.system.entity.AppVersionsExample;
import com.ibiaoke.system.mapper.AppVersionsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class AppVersionDao extends BaseDao<AppVersions, AppVersionsExample, Integer, AppVersionsMapper>{

    @Autowired
    private AppVersionsMapper appVersionsMapper;

    @Override
    public AppVersionsMapper getMapper() {
        return appVersionsMapper;
    }

    public List<AppVersions> getAppVersion(String type) {
        AppVersionsExample example = new AppVersionsExample();
        example.createCriteria().andTypeEqualTo(type);
        return appVersionsMapper.selectByExample(example);
    }
}
